<?php

?>
<!-- page heading start-->
<div class="page-heading">
    <h3>
        数据统计
    </h3>

</div>
<!-- page heading end-->
<div class="row">
    <div class="col-sm-12">
        <section class="panel">
            <header class="panel-heading">
                <!--<a class="btn btn-default" href="/User/Applications/selectAdd">增加</a>-->
            </header>
            <div class="panel-body">
                <table class="table table-hover general-table table-bordered">
                    <thead>
                    <tr>
                        <th width="12%">投票活动名称</th>
                        <th width="20%">投票量</th>
                        <th width="7%">参与人数</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php
                    $votes = 0;
                    $pers = 0;
                    foreach($praise_list as $val){?>
                    <tr>
                        <td>
                            <span style="word-break:break-all;word-wrap:break-word">
                                <?php echo $val['title'];?>
                            </span>
                        </td>
                        <td>
                            <span style="word-break:break-all;word-wrap:break-word">
                                <?php
                                echo $val['votes']?$val['votes']:0;
                                $votes += $val['votes']?$val['votes']:0;
                            ?>
                            </span>
                        </td>
                        <td>
                            <span style="word-break:break-all;word-wrap:break-word">
                                <?php
                                echo $val['record']?$val['record']:0;
                                $pers += $val['record'];
                            ?>
                            </span>
                        </td>
                    </tr>
                    <?php }
                    echo "<tr><td>总数</td><td>";
                        echo $votes . "</td><td>";
                        echo $pers . "</td>";
                ?>
                    </tbody>
                </table>
            </div>
        </section>
    </div>
</div>
<script>

</script>